import request from '@/utils/request'

// 获取权限列表
export function getPermissions(params) {
  return request({
    url: '/permissions',
    method: 'get',
    params
  })
}

// 新增权限
export function addPermissions(data) {
  return request({
    url: '/permissions',
    method: 'post',
    data
  })
}

// 获取指定权限
export function getPermissionsById(id) {
  return request({
    url: '/permissions/' + id,
    method: 'get'
  })
}

// 编辑权限
export function EditPermissions(data) {
  return request({
    url: '/permissions/' + data.id,
    method: 'put',
    data
  })
}

// 删除权限
export function delPermissions(id) {
  return request({
    url: '/permissions/' + id,
    method: 'delete'
  })
}
